package schoolWork.work03.text1;

public class Teacher extends Person{
    private double salary;

    public Teacher() {
    }

    public Teacher(String name, String sex, int birthyear, double salary) {
        super(name, sex, birthyear);
        this.salary = salary;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
    @Override
    public String toString(){
        super.toString();
        System.out.println("salary = " + salary);
        return null;
    }
}
